<template>
  <div id="app">
    <router-view />
    <van-tabbar v-model="active" route fixed>
      <van-tabbar-item replace to="/">
        <i class="toutiao iconshouye" style="margin-bottom:3px"></i> 首页
      </van-tabbar-item>
      <van-tabbar-item replace to="/wenda">
        <i class="toutiao iconwenda" style="margin-bottom:3px"></i>问答
      </van-tabbar-item>
      <van-tabbar-item replace to="/shipin">
        <i class="toutiao iconshipin" style="margin-bottom:3px"></i>视频
      </van-tabbar-item>
      <van-tabbar-item replace to="/weidenglu">
        <i class="toutiao iconwode" style="margin-bottom:3px"></i>
        {{this.$store.state.user?'我的':'未登录'}}
      </van-tabbar-item>
    </van-tabbar>
  </div>
</template>
<script>
// import { Toast } from "vant";
export default {
  data() {
    return {
      active: 0,
    };
  },
  methods: {
    onClickLeft() {
      // Toast("返回");
      this.$toast("返回");
    },
    onClickRight() {
      // Toast("按钮");
      this.$toast("按钮");
    },
  },
};
</script>

<style lang="less">
.van-tabbar-item__text {
  display: flex;
  flex-direction: column;
  text-align: center;
}
</style>
